<h1>资源分类列表</h1>
<table>
  <thead>
    <tr>
      <th>ID</th>
      <th>名称</th>
    </tr>
  </thead>
  <% @categories.each do |category| %>
    <tr>
      <td><%= category.id %></td>
      <td><%= category.name %></td>
      <td><%= link_to '编辑', :action => 'edit', :id => category %> | <%= link_to '删除', :action=>'destroy', :id=>category %></td>
    </tr>
  <% end %>
</table>

<br />
<%= link_to '添加新资源', :action=>'new'%>
